package com.sky.flyweight;

/**
 * date : 2024-09-13
 *
 * 享元模式 ,  Integer 常量池 存储 数据 -128~127
 *
 * @author : wushikai
 */
public class IntegerApplication {

    public static void main(String[] args) {


        Integer a = Integer.valueOf(127);
        Integer b = 127;

        Integer c = Integer.valueOf(128);
        Integer d = 128;

        System.out.println(a == b); //true
        System.out.println(c == d);

    }
}
